package org.example.testdemo.controller;

import jakarta.annotation.Resource;
import org.example.testdemo.service.DepartmentService;
import org.example.testdemo.tool.ApiResponse;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("department")
public class DepartmentController {

    @Resource
    private DepartmentService departmentService;

    @PostMapping("getDepartment")
    public ApiResponse getDepartment(){
        return ApiResponse.success(departmentService.departmentlList());
    }

}
